package com.coolwen.spring.ioc.java;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author CoolWen
 * @version 2020-03-12 9:27
 */
public class TestJava {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(BaseConfiguration.class);
        Knight k = ctx.getBean("knight", Knight.class);
//        k.setUsername("老张");
        k.fight();
    }
}
